package respostas;

import comportamento.funcaoativacao.IFuncaoAtivacao;

import concreto.funcaoativacao.FuncaoAtivacaoDegrau;
import concreto.funcaoativacao.FuncaoAtivacaoGaussiana;
import concreto.funcaoativacao.FuncaoAtivacaoLinear;
import concreto.funcaoativacao.FuncaoAtivacaoSignada;
import concreto.funcaoativacao.FuncaoAtivacaoSinal;

public class AC02 {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		double uk1 = 2;
		double lm1 = 1;

		double uk2 = 3;
		double lm2 = 4;

		double uk3 = 30;
		double lm3 = 10;

		double uk4 = 0.5;
		double lm4 = 1;

		int MAX = 20;

		System.out.println("[LINEAR]\n");
		IFuncaoAtivacao f = new FuncaoAtivacaoLinear();

		for(int x = 0; x < MAX; x++) {
			uk1 = x;
			System.out.println("Linear: uk = " + uk1 + ", lm = " + lm1 + ", y = " +  f.estimularNeuronio(uk1, lm1) + "");
		}

		System.out.println("\n[DEGRAU]\n");
		f = new FuncaoAtivacaoDegrau();

		for(int x = 0; x < MAX; x++) {
			uk2 = x;
			System.out.println("Degrau: uk = " + uk2 + ", lm = " + lm2 + ", y = " +  f.estimularNeuronio(uk2, lm2) + "");
		}
		
		System.out.println("\n[GAUSSIANA]\n");
		f = new FuncaoAtivacaoGaussiana();

		for(int x = -10; x < 10; x++) {
			uk3 = x;
			System.out.println("Gaussiana: uk = " + uk3 + ", lm = " + lm3 + ", y = " +  f.estimularNeuronio(uk3, lm3) + "");
		}

		System.out.println("\n[SIGMOIDAL]\n");
		f = new FuncaoAtivacaoSignada();

		for(int x = 0; x < MAX; x++) {
			uk4 = x;
			System.out.println("Sigmoidal: uk = " + uk4 + ", lm = " + lm4 + ", y = " +  f.estimularNeuronio(uk4, lm4) + "");
		}
		
		System.out.println("\n[SINAL]\n");
		f = new FuncaoAtivacaoSinal();

		for(int x = 0; x < MAX; x++) {
			uk4 = x;
			System.out.println("Sinal: uk = " + uk4 + ", lm = " + lm4 + ", y = " +  f.estimularNeuronio(uk4, lm4) + "");
		}		
	}

}
